public class SilverCardMember extends Member {
    private double totalCost = 0.0;
    private double points = 0.0;

    public SilverCardMember(String info) {
        super(info);
    }

    @Override
    public double consume(double amount) {
        double actualPayment = amount;
        
        if (points >= 1000) {
            double pointsToUse = Math.floor((points - 1000) / 50);
            double discount = pointsToUse * 1.5;
            actualPayment = Math.max(0, amount - discount);
        }
        
        // Add new points based on spending
        points += amount / 30;
        
        totalCost += actualPayment;
        return actualPayment;
    }

    @Override
    public double getTotalCost() {
        return totalCost;
    }

    public double getPoints() {
        return points;
    }

    @Override
    public String toString() {
        return String.format("SilverCardMember: %s points=%.1f", super.toString(), points);
    }
} 